package com.bjb.vr.common.dto;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 帮助文档表
 * @TableName opt_help_doc
 */
@TableName(value ="opt_help_doc")
@Data
public class OptHelpDoc implements Serializable {
    /**
     *
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 帮助文档标题
     */
    @TableField(value = "doc_title")
    private String docTitle;

    /**
     * 分类
     */
    @TableField(value = "doc_catalog")
    private String docCatalog;

    /**
     * 帮助文档名
     */
    @TableField(value = "doc_file_name")
    private String docFileName;

    /**
     * 帮助文档路径
     */
    @TableField(value = "doc_file_path")
    private String docFilePath;

    /**
     * 创建者
     */
    @TableField(value = "creator")
    private String creator;

    /**
     * 修改者
     */
    @TableField(value = "modifier")
    private String modifier;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @TableField(value = "gmt_create", fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @TableField(value = "gmt_modified", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtModified;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OptHelpDoc other = (OptHelpDoc) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDocTitle() == null ? other.getDocTitle() == null : this.getDocTitle().equals(other.getDocTitle()))
            && (this.getDocCatalog() == null ? other.getDocCatalog() == null : this.getDocCatalog().equals(other.getDocCatalog()))
            && (this.getDocFileName() == null ? other.getDocFileName() == null : this.getDocFileName().equals(other.getDocFileName()))
            && (this.getDocFilePath() == null ? other.getDocFilePath() == null : this.getDocFilePath().equals(other.getDocFilePath()))
            && (this.getCreator() == null ? other.getCreator() == null : this.getCreator().equals(other.getCreator()))
            && (this.getModifier() == null ? other.getModifier() == null : this.getModifier().equals(other.getModifier()))
            && (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
            && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDocTitle() == null) ? 0 : getDocTitle().hashCode());
        result = prime * result + ((getDocCatalog() == null) ? 0 : getDocCatalog().hashCode());
        result = prime * result + ((getDocFileName() == null) ? 0 : getDocFileName().hashCode());
        result = prime * result + ((getDocFilePath() == null) ? 0 : getDocFilePath().hashCode());
        result = prime * result + ((getCreator() == null) ? 0 : getCreator().hashCode());
        result = prime * result + ((getModifier() == null) ? 0 : getModifier().hashCode());
        result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
        result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", docTitle=").append(docTitle);
        sb.append(", docCatalog=").append(docCatalog);
        sb.append(", docFileName=").append(docFileName);
        sb.append(", docFilePath=").append(docFilePath);
        sb.append(", creator=").append(creator);
        sb.append(", modifier=").append(modifier);
        sb.append(", gmtCreate=").append(gmtCreate);
        sb.append(", gmtModified=").append(gmtModified);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
